function test(value) {
    const  v =value||1;
    return v;
}

function test2(value=1) {
    const  v=value;
    return v;
}

console.log(test());
console.log(test(2));

console.log(test2(1));
console.log(test2(2));
